package com.lagou.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 邮件微服务调用接口
 * @author yzh
 * @date 2020/5/3 10:25
 */
@FeignClient(name="lagou-springcloud-service-email", fallback = EmailFeignClientFallBack.class)
public interface EmailFeignClient {

    /**
     * 发送邮件的方法
     * @param email 收件方邮箱
     * @param code 验证码
     * @return 发送结果
     */
    @GetMapping("/api/email/sendEmail/{email}/{code}")
    boolean sendEmail(@PathVariable String email, @PathVariable String code);
}
